<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class User extends Model
{
    use SoftDeletes;



    /*
     * domain logic
     */
    public static function getByPhone($phone)
    {
        return User::where('phone', $phone)->first();
    }

    public static function getByEmail($email)
    {
        return User::where('email', $email)->first();
    }

    public static function getByName($name)
    {
        return User::where('name', $name)->first();
    }
}
